package com.kymatrix.mpo.plus.bpm.server.model.form.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.URL;

@ApiModel(value = "管理后台 - 流程模型的更新 Request")
@Data
@Accessors(chain=true)
public class UpdateBpmModelReq {

    @ApiModelProperty(value = "编号", example = "1024")
    @NotEmpty(message = "编号不能为空")
    private String id;

    @ApiModelProperty(value = "流程名称", example = "zhangsan")
    private String name;

    @ApiModelProperty(value = "流程图标", example = "https://www.iocoder.cn/yudao.jpg")
    @URL(message = "流程图标格式不正确")
    private String icon;

    @ApiModelProperty(value = "流程描述", example = "我是描述")
    private String description;

    @ApiModelProperty(value = "流程分类", example = "1")
    private String category;

    @ApiModelProperty(value = "BPMN XML")
    private String bpmnXml;

    @ApiModelProperty(value = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
    @NotEmpty(message = "表单类型不能为空")
    private String formType;
    
    @ApiModelProperty(value = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时，必须非空", example = "1024")
    private String formId;
    
    @ApiModelProperty(value = "自定义表单的提交路径，使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时，必须非空",
            example = "/bpm/oa/leave/create")
    private String formCustomCreatePath;
    
    @ApiModelProperty(value = "自定义表单的查看路径，使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时，必须非空",
            example = "/bpm/oa/leave/view")
    private String formCustomViewPath;

}
